package com.imooc.service;

import com.imooc.domain.OrderDetail;
import com.imooc.domain.OrderMaster;
import com.imooc.dto.OrderDTO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * Create By Liuqz
 *
 * @date 2018/6/2 20:49
 */
public interface OrderMasterService {

    /** 创建订单 */
    OrderDTO create(OrderDTO orderDTO);

    /** 查询单个订单 */
    OrderDTO findOne(String orderId);

    /** 查询订单列表 */
    Page<OrderDTO> findList(String buyerOpenId, Pageable pageable);

    /** 卖家端查询订单列表 */
    Page<OrderDTO> findList(Pageable pageable);

    /** 取消订单 */
    OrderDTO cancel(OrderDTO orderDTO);

    /** 完结订单 */
    OrderDTO finish(OrderDTO orderDTO);

    /** 支付订单 */
    OrderDTO paid(OrderDTO orderDTO);

    /** 根据条件查询订单 */
    List<OrderDetail> findSearch(OrderDetail orderDetail);
}
